package com.acme.bankapp.domain.bank.exception;

import com.acme.bankapp.domain.bank.client.Client;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public class ClientExistsException extends BankException {
    private Client client;

    public ClientExistsException(Client client) {
        this.client = client;
    }

    @Override
    public String getMessage() {
        return String.format("Client %s already exists", client);
    }

    public ClientExistsException(String message) {
        super(message);
    }

    public ClientExistsException(String message, Throwable cause) {
        super(message, cause);
    }

    public ClientExistsException(Throwable cause) {
        super(cause);
    }
}
